<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>

<c:forEach items="${list}" var="list" varStatus="stuts">
	<li class="touchLi"  data-id="${list.id }">
		<div class="h_user">
			<a href="api/myself/userInfo.do?USERID=${list.user.id }">
				<div class="h_user_pic">
					<img src="${list.user.headimgurl }" style="border-radius: 50%;" />
				</div>
				<div class="h_user_name">
					<span class="name">${list.user.nickName }</span> <span>${time[stuts.index] }</span>
				</div>
				<div class="h_user_grade">
					<img src="images/g${llist[stuts.index]+1}.png" />
				</div>
			</a>
			 <a class="price" href="javascript:void(0)">
				<div class="h_price">
					<span class="triangle-left"></span>
					<div class="oblong">
						<span class="o_price"><fmt:formatNumber
								value="${list.cost }" type="currency" pattern="￥" /> </span> <span
							class="o_del"><fmt:formatNumber
								value="${list.originalCost }" type="currency" pattern="￥" /></span>
					</div>
				</div>
			</a>
		</div>

		<div class="gs_photo">
			<ul>
				<c:forEach items="${list.images}" var="item" varStatus="i">
					<c:if test="${i.index < 4 }">
						<li><a href="javascript:void(0)"> <img src="${item.path }" />
						</a></li>
					</c:if>

				</c:forEach>
			</ul>
		</div>

		<div class="gs_text">
			<h4>${list.title }</h4>
			<p>${list.describle }</p>
		</div>

		<div class="address" id="address">
			<%-- <img src="images/place1.png" /> <span>来自 &nbsp;&nbsp;${list.location.place }</span> --%> <a href="javascript:void(0)">
				<img src="images/like.png" /> <span>${list.zan }</span>
			</a> <a href="javascript:void(0)"> <img src="images/assess.png" /> <span>${commentNum[stuts.index]  }</span>
			</a>

		</div>
		<hr/>
	</li>
</c:forEach>

<script type="text/javascript">
$(".tabcontent input").val('${isLast}');
$(".touchLi").click(function(){
	var thingId = $(this).data("id");
	window.location.href="api/index/goodsDetail.do?THING_ID="+thingId; 
});
</script>
